<% 
	String headerFile = request.getAttribute('header') 
	log.info "headerFile = "+headerFile
	include '/WEB-INF/includes/'+headerFile+'.gtpl'


            def entities = request.getAttribute('entities')
	    if (entities) {
            log.info "nbr of articles ="+entities.size()



            entities.each { article ->

               println """<div class="article">
                        	<h2 class="entry-title">
	                        	${article.title}
	                    	</h2>

	                    <p class="entry-meta">${article.updated.substring(0,10)}

	                    ${if (article.feedName) " | <a href='http://"+article.feedName+"'>"+article.feedName+"</a>" else ""}</p>

	                    	<div class="entry-content">
		                	${article.content}
	                    	</div>
	                    </div>
	                    <hr />"""

            }



        } else {
            log.info "no articles"
        }


    include '/WEB-INF/includes/footer.gtpl'

%>
